﻿using System;
using System.Windows;

namespace CrateMayhem.Desktop.Common
{
    public static class UriResourceExtensions
    {
        public static T Get<T>(this Uri uri, string key)
        {
            var dictionary = new ResourceDictionary { Source = uri };
            return (T)dictionary[key];
        }
    }
}
